// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class SPM : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Set ID - SPM",1)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"SI")]
	    public SI SetIDSPM {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Specimen ID",2)]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"EIP")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"EIP")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"EIP")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"EIP")]
	    public EIP SpecimenID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Specimen Parent IDs",3)]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.True, HL7Required.True,"EIP")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.True, HL7Required.True,"EIP")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.True, HL7Required.True,"EIP")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.True, HL7Required.True,"EIP")]
	    public EIP[] SpecimenParentIDs {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Specimen Type",4)]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpecimenType]
	    public CWE SpecimenType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Specimen Type Modifier",5)]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.True, HL7Required.True,"CWE")]
		[SpecimenTypeModifier]
	    public CWE[] SpecimenTypeModifier {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Specimen Additives",6)]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.True, HL7Required.True,"CWE")]
		[AdditivePreservative]
	    public CWE[] SpecimenAdditives {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Specimen Collection Method",7)]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpecimenCollectionMethod]
	    public CWE SpecimenCollectionMethod {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Specimen Source Site",8)]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE SpecimenSourceSite {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Specimen Source Site Modifier",9)]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.True, HL7Required.True,"CWE")]
		[SpecimenSourceTypeModifier]
	    public CWE[] SpecimenSourceSiteModifier {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Specimen Collection Site",10)]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpecimenCollectionSite]
	    public CWE SpecimenCollectionSite {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Specimen Role",11)]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.True, HL7Required.True,"CWE")]
		[SpecimenRole]
	    public CWE[] SpecimenRole {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Specimen Collection Amount",12)]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"CQ")]
	    public CQ SpecimenCollectionAmount {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Grouped Specimen Count",13)]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM GroupedSpecimenCount {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Specimen Description",14)]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.True, HL7Required.True,"ST")]
	    public ST[] SpecimenDescription {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Specimen Handling Code",15)]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.True, HL7Required.True,"CWE")]
		[SpecialHandlingCode]
	    public CWE[] SpecimenHandlingCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Specimen Risk Code",16)]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.True, HL7Required.True,"CWE")]
		[RiskCodes]
	    public CWE[] SpecimenRiskCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Specimen Collection Date/Time",17)]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.False, HL7Required.True,"DR")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.False, HL7Required.True,"DR")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"DR")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.False, HL7Required.True,"DR")]
	    public DR SpecimenCollectionDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Specimen Received Date/Time",18)]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM SpecimenReceivedDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Specimen Expiration Date/Time",19)]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM SpecimenExpirationDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Specimen Availability",20)]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID SpecimenAvailability {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Specimen Reject Reason",21)]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.True, HL7Required.True,"CWE")]
		[SpecimenRejectReason]
	    public CWE[] SpecimenRejectReason {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Specimen Quality",22)]
  	    [HL7Field(HL7Version.v25, 22, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 22, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpecimenQuality]
	    public CWE SpecimenQuality {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Specimen Appropriateness",23)]
  	    [HL7Field(HL7Version.v25, 23, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 23, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpecimenAppropriateness]
	    public CWE SpecimenAppropriateness {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Specimen Condition",24)]
  	    [HL7Field(HL7Version.v25, 24, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 24, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.True, HL7Required.True,"CWE")]
		[SpecimenCondition]
	    public CWE[] SpecimenCondition {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 Specimen Current Quantity",25)]
  	    [HL7Field(HL7Version.v25, 25, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v251, 25, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.False, HL7Required.True,"CQ")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.False, HL7Required.True,"CQ")]
	    public CQ SpecimenCurrentQuantity {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("26 Number of Specimen Containers",26)]
  	    [HL7Field(HL7Version.v25, 26, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 26, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 26, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 26, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM NumberofSpecimenContainers {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("27 Container Type",27)]
  	    [HL7Field(HL7Version.v25, 27, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 27, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 27, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 27, HL7Repeat.False, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE ContainerType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("28 Container Condition",28)]
  	    [HL7Field(HL7Version.v25, 28, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 28, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 28, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 28, HL7Repeat.False, HL7Required.True,"CWE")]
		[ContainerCondition]
	    public CWE ContainerCondition {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("29 Specimen Child Role",29)]
  	    [HL7Field(HL7Version.v25, 29, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v251, 29, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v26, 29, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 29, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpecimenChildRole]
	    public CWE SpecimenChildRole {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("30 Accession ID",30)]
  	    [HL7Field(HL7Version.v27, 30, HL7Repeat.True, HL7Required.True,"CX")]
	    public CX[] AccessionID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("31 Other Specimen ID",31)]
  	    [HL7Field(HL7Version.v27, 31, HL7Repeat.True, HL7Required.True,"CX")]
	    public CX[] OtherSpecimenID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("32 Shipment ID",32)]
  	    [HL7Field(HL7Version.v27, 32, HL7Repeat.False, HL7Required.True,"EI")]
	    public EI ShipmentID {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 45)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 46)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 47)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 48)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 49)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 50)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 51)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 52)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			SetIDSPM = (SI)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(SI), "SPM.1");
			SpecimenID = (EIP)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(EIP), "SPM.2");
	    	SpecimenParentIDs = (EIP[])ParseTextAtPositionIntoDataArray<EIP>(segmentTextParts, 3, options, "SPM.3");
			SpecimenType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(CWE), "SPM.4");
	    	SpecimenTypeModifier = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 5, options, "SPM.5");
	    	SpecimenAdditives = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 6, options, "SPM.6");
			SpecimenCollectionMethod = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(CWE), "SPM.7");
			SpecimenSourceSite = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(CWE), "SPM.8");
	    	SpecimenSourceSiteModifier = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 9, options, "SPM.9");
			SpecimenCollectionSite = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(CWE), "SPM.10");
	    	SpecimenRole = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 11, options, "SPM.11");
			SpecimenCollectionAmount = (CQ)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(CQ), "SPM.12");
			GroupedSpecimenCount = (NM)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(NM), "SPM.13");
	    	SpecimenDescription = (ST[])ParseTextAtPositionIntoDataArray<ST>(segmentTextParts, 14, options, "SPM.14");
	    	SpecimenHandlingCode = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 15, options, "SPM.15");
	    	SpecimenRiskCode = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 16, options, "SPM.16");
			SpecimenCollectionDateTime = (DR)ParseTextAtPositionIntoData(segmentTextParts, 17, options, typeof(DR), "SPM.17");
			SpecimenReceivedDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(DTM), "SPM.18");
			SpecimenExpirationDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(DTM), "SPM.19");
			SpecimenAvailability = (ID)ParseTextAtPositionIntoData(segmentTextParts, 20, options, typeof(ID), "SPM.20");
	    	SpecimenRejectReason = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 21, options, "SPM.21");
			SpecimenQuality = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(CWE), "SPM.22");
			SpecimenAppropriateness = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(CWE), "SPM.23");
	    	SpecimenCondition = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 24, options, "SPM.24");
			SpecimenCurrentQuantity = (CQ)ParseTextAtPositionIntoData(segmentTextParts, 25, options, typeof(CQ), "SPM.25");
			NumberofSpecimenContainers = (NM)ParseTextAtPositionIntoData(segmentTextParts, 26, options, typeof(NM), "SPM.26");
			ContainerType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 27, options, typeof(CWE), "SPM.27");
			ContainerCondition = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 28, options, typeof(CWE), "SPM.28");
			SpecimenChildRole = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 29, options, typeof(CWE), "SPM.29");
	    	AccessionID = (CX[])ParseTextAtPositionIntoDataArray<CX>(segmentTextParts, 30, options, "SPM.30");
	    	OtherSpecimenID = (CX[])ParseTextAtPositionIntoDataArray<CX>(segmentTextParts, 31, options, "SPM.31");
			ShipmentID = (EI)ParseTextAtPositionIntoData(segmentTextParts, 32, options, typeof(EI), "SPM.32");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("SPM");
		    segmentParts.Add(SetIDSPM);
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenID, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenParentIDs, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenType, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenTypeModifier, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenAdditives, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenCollectionMethod, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenSourceSite, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenSourceSiteModifier, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenCollectionSite, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenRole, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenCollectionAmount, options));
			segmentParts.Add(GetER7TextForSegmentPart(GroupedSpecimenCount, options));
		    segmentParts.Add(ConvertStringArray(SpecimenDescription, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenHandlingCode, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenRiskCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenCollectionDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenReceivedDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenExpirationDateTime, options));
		    segmentParts.Add(SpecimenAvailability);
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenRejectReason, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenQuality, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenAppropriateness, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(SpecimenCondition, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenCurrentQuantity, options));
			segmentParts.Add(GetER7TextForSegmentPart(NumberofSpecimenContainers, options));
			segmentParts.Add(GetER7TextForSegmentPart(ContainerType, options));
			segmentParts.Add(GetER7TextForSegmentPart(ContainerCondition, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecimenChildRole, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(AccessionID, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(OtherSpecimenID, options));
			segmentParts.Add(GetER7TextForSegmentPart(ShipmentID, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

